angular.module('app')
  .directive('repeatFinish', function() {
    return {
      restrict: 'A',
      link: function(scope, element, attr) {
        console.log(scope.$index)
        if (scope.$last == true) {
          console.log('ng-repeat执行完毕')
          setTimeout(function(){
            scope.$eval(attr.repeatFinish)
          },0)
        }
      }
    }
  });
